package net.xiangcaowuyu.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import net.xiangcaowuyu.springcloud.service.OpenFeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.concurrent.TimeUnit;

/**
 * 博客：https://www.xiangcaowuyu.net
 * Description:
 *
 * @Author: 香草物语
 * DateTime: 2021-07-24 15:16
 */
@RestController
@Slf4j
@RequestMapping("/consumer")
public class OrderFeignController {

    @Resource
    private OpenFeignService openFeignService;

    @GetMapping("/openfeign/getPayment")
    public String getPayment() {
        return openFeignService.paymentzk();
    }

    @GetMapping("/payment/feign/timeout")
    public String paymentFeignTimeout() {
        return openFeignService.paymentFeignTimeout();
    }
}
